package ch7design;

import java.util.List;

public class BaseFileSystem {
	/*
	 * Basic file/folder attributes are: 1. File/Folder Size 2. File/Folder Date
	 * created 3. File/Folder Date Modified 4. File/Folder permissions - Read,
	 * write and execute 5. File/Folder Owner - Owner of the file who defines
	 * permissions for other users 6. File/Folder Visibility - Hidden or Visible
	 * 7. File/Folder Name
	 * 
	 * Hence each one of the above attributes would have public <return type>
	 * get() and public void set<AttributeName>(<variable datatype>)
	 */
	boolean isFile() {
		return false;}

	boolean canRead() {
		return false;}
	boolean canWrite() {
		return false;}
	boolean canExecute() {
		return false;}
}

class File extends BaseFileSystem {
	/*
	 * The `File` class should implement all of the methods from interface
	 * `BaseFilesystem`. In addition, it must also implement following specific
	 * methods that can only be associated with physical files
	 */

	@Override
	public boolean isFile() {
		// TODO Auto-generated method stub
		return true;
	};
	
	public void read(List<Byte> bytes) {}
	public void write(List<Byte> bytes) {}

}

class Folder extends BaseFileSystem {

	/*
	 * The `Folder` class should implement all of the methods from interface
	 * `BaseFileSystem`. In addition, it must also implement following specific
	 * methods that can only be associated with the physical 'folders'
	 */
	public BaseFileSystem[] getSubFoldersAndFiles() {
		return null;
	}

	public File[] getFiles() {
		return null;
	}
	
	public Folder[] getFolders() {
		return null;
	}
	
	public void addSubFolderAndFiles(BaseFileSystem fileObj) {
	}

	@Override
	public boolean isFile() {
		// TODO Auto-generated method stub
		return false;
	}
}